package com.bsdsma.visonManagementSystemapp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bsdsma.visonManagementSystemapp.dto.PageRetDto;
import com.bsdsma.visonManagementSystemapp.dto.SchoolDto;
import com.bsdsma.visonManagementSystemapp.dto.DataGroupByDateDto;
import com.bsdsma.visonManagementSystemapp.entity.School;
import java.util.Date;
import java.util.List;

public interface SchoolService extends IService<School> {
    
    /**
     * Add a new school
     * @param schoolDto school information
     * @return the added school
     */
    School add(SchoolDto schoolDto);
    
    /**
     * Update an existing school
     * @param id school id
     * @param schoolDto updated school information
     * @return the updated school
     */
    School update(Long id, SchoolDto schoolDto);
    
    /**
     * Delete a school
     * @param id school id
     */
    void delete(Long id);
    
    /**
     * Search schools with pagination
     * @param schoolDto search criteria
     * @param pageNum page number
     * @param pageSize page size
     * @return paginated school list
     */
    PageRetDto<SchoolDto> search(SchoolDto schoolDto, Integer pageNum, Integer pageSize);
    
    /**
     * Get school by ID
     * @param id school id
     * @return school information
     */
    School getById(Long id);

    /**
     * Find school by name
     * @param name school name
     * @return school information
     */
    School findByName(String name);

    /**
     * Get all schools
     * @return list of all schools
     */
    List<School> listAll();

    /**
     * Get school count by day
     * @param beginDate start date
     * @param endDate end date
     * @return list of daily counts
     */
    List<DataGroupByDateDto> countByDay(Date beginDate, Date endDate);
} 